/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlListDePr.java
 *
 * Created on 20 ม.ค. 2553, 0:55:14
 */

package Inventory;

/**
 *
 * @author Administrator
 */
public class PnlListPr extends javax.swing.JPanel {

    /** Creates new form PnlListDePr */
    public PnlListPr() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadListDr = new javax.swing.JPanel();
        lblHeadListPr = new javax.swing.JLabel();
        btnPrListSearch = new javax.swing.JButton();
        btnPrListEdit = new javax.swing.JButton();
        btnPrPrint = new javax.swing.JButton();
        pnlListDePr = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListDePr = new javax.swing.JTable();
        lblProCode = new javax.swing.JLabel();
        lblProName = new javax.swing.JLabel();
        lblDePrCode = new javax.swing.JLabel();
        txtProCode = new javax.swing.JTextField();
        txtProName = new javax.swing.JTextField();
        txtDePrCode = new javax.swing.JTextField();
        lblTyCode = new javax.swing.JLabel();
        txtTyCode = new javax.swing.JTextField();
        lblStCode = new javax.swing.JLabel();
        rbtStaBuyWait = new javax.swing.JRadioButton();
        rbtStaBuyApproval = new javax.swing.JRadioButton();
        rbtStaBuyCancel = new javax.swing.JRadioButton();
        rbtStaBuyClose = new javax.swing.JRadioButton();
        lblDePrQty = new javax.swing.JLabel();
        txtDePrQty = new javax.swing.JTextField();
        lblPrDate = new javax.swing.JLabel();
        txtPrDate = new javax.swing.JTextField();
        lblPrDateRe = new javax.swing.JLabel();
        txtPrDateRe = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadListDr.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadListDr.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadListDr.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadListDr.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadListPr.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadListPr.setText("จัดการการขอซื้อ");

        btnPrListSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnPrListEdit.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        btnPrListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnPrListEdit.setMaximumSize(new java.awt.Dimension(75, 30));
        btnPrListEdit.setMinimumSize(new java.awt.Dimension(75, 30));
        btnPrListEdit.setPreferredSize(new java.awt.Dimension(75, 30));

        btnPrPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnPrPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnPrPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnPrPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadListDrLayout = new javax.swing.GroupLayout(pnlHeadListDr);
        pnlHeadListDr.setLayout(pnlHeadListDrLayout);
        pnlHeadListDrLayout.setHorizontalGroup(
            pnlHeadListDrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListDrLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadListDrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlHeadListDrLayout.createSequentialGroup()
                        .addComponent(btnPrListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPrListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPrPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblHeadListPr))
                .addContainerGap(540, Short.MAX_VALUE))
        );
        pnlHeadListDrLayout.setVerticalGroup(
            pnlHeadListDrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListDrLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lblHeadListPr)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadListDrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnPrPrint, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnlHeadListDrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(btnPrListSearch, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                        .addComponent(btnPrListEdit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)))
                .addContainerGap())
        );

        add(pnlHeadListDr, java.awt.BorderLayout.PAGE_START);

        tblListDePr.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblListDePr.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "รหัสใบขอซื้อ", "ประเภทสินค้า", "รหัสสินค้า"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListDePr);

        lblProCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProCode.setText("รหัสสินค้า :");

        lblProName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProName.setText("รายการสินค้า :");

        lblDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblDePrCode.setText("รหัสใบขอซื้อ :");

        txtProCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProName.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblTyCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblTyCode.setText("ประเภทสินค้า :");

        txtTyCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblStCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblStCode.setText("สถานะการซื้อ :");

        rbtStaBuyWait.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtStaBuyWait.setText("รออนุมัติ");
        rbtStaBuyWait.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyWaitActionPerformed(evt);
            }
        });

        rbtStaBuyApproval.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtStaBuyApproval.setText("อนุมัติ");
        rbtStaBuyApproval.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyApprovalActionPerformed(evt);
            }
        });

        rbtStaBuyCancel.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtStaBuyCancel.setText("ยกเลิก");
        rbtStaBuyCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyCancelActionPerformed(evt);
            }
        });

        rbtStaBuyClose.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtStaBuyClose.setText("ปิดใบงาน");
        rbtStaBuyClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaBuyCloseActionPerformed(evt);
            }
        });

        lblDePrQty.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblDePrQty.setText("จำนวนสินค้า :");

        txtDePrQty.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblPrDate.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPrDate.setText("วันที่ขอซื้อ :");

        txtPrDate.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblPrDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPrDateRe.setText("วันที่ต้องการสินค้า :");

        txtPrDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));

        javax.swing.GroupLayout pnlListDePrLayout = new javax.swing.GroupLayout(pnlListDePr);
        pnlListDePr.setLayout(pnlListDePrLayout);
        pnlListDePrLayout.setHorizontalGroup(
            pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListDePrLayout.createSequentialGroup()
                .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListDePrLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProCode)
                            .addComponent(lblDePrCode)
                            .addComponent(lblPrDate)
                            .addComponent(lblDePrQty))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtDePrQty)
                            .addComponent(txtPrDate, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtProCode)
                            .addComponent(txtDePrCode, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblTyCode)
                            .addComponent(lblProName)
                            .addComponent(lblStCode)
                            .addComponent(lblPrDateRe))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlListDePrLayout.createSequentialGroup()
                                .addComponent(rbtStaBuyWait)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaBuyApproval)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaBuyCancel)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaBuyClose))
                            .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txtPrDateRe, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtProName, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtTyCode, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 60, Short.MAX_VALUE))
                    .addGroup(pnlListDePrLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 690, Short.MAX_VALUE)))
                .addContainerGap())
        );
        pnlListDePrLayout.setVerticalGroup(
            pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListDePrLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtDePrCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblDePrCode)
                    .addComponent(lblTyCode)
                    .addComponent(txtTyCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProCode)
                    .addComponent(txtProCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtProName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblProName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblPrDate)
                        .addComponent(txtPrDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblPrDateRe)
                        .addComponent(txtPrDateRe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListDePrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblStCode)
                        .addComponent(lblDePrQty)
                        .addComponent(rbtStaBuyWait)
                        .addComponent(rbtStaBuyApproval)
                        .addComponent(rbtStaBuyCancel)
                        .addComponent(rbtStaBuyClose))
                    .addComponent(txtDePrQty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(157, 157, 157))
        );

        add(pnlListDePr, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void rbtStaBuyWaitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyWaitActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyWaitActionPerformed

    private void rbtStaBuyApprovalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyApprovalActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyApprovalActionPerformed

    private void rbtStaBuyCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyCancelActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyCancelActionPerformed

    private void rbtStaBuyCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaBuyCloseActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaBuyCloseActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnPrListEdit;
    private javax.swing.JButton btnPrListSearch;
    private javax.swing.JButton btnPrPrint;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblDePrCode;
    private javax.swing.JLabel lblDePrQty;
    private javax.swing.JLabel lblHeadListPr;
    private javax.swing.JLabel lblPrDate;
    private javax.swing.JLabel lblPrDateRe;
    private javax.swing.JLabel lblProCode;
    private javax.swing.JLabel lblProName;
    private javax.swing.JLabel lblStCode;
    private javax.swing.JLabel lblTyCode;
    private javax.swing.JPanel pnlHeadListDr;
    private javax.swing.JPanel pnlListDePr;
    private javax.swing.JRadioButton rbtStaBuyApproval;
    private javax.swing.JRadioButton rbtStaBuyCancel;
    private javax.swing.JRadioButton rbtStaBuyClose;
    private javax.swing.JRadioButton rbtStaBuyWait;
    private javax.swing.JTable tblListDePr;
    private javax.swing.JTextField txtDePrCode;
    private javax.swing.JTextField txtDePrQty;
    private javax.swing.JTextField txtPrDate;
    private javax.swing.JTextField txtPrDateRe;
    private javax.swing.JTextField txtProCode;
    private javax.swing.JTextField txtProName;
    private javax.swing.JTextField txtTyCode;
    // End of variables declaration//GEN-END:variables

}
